package bb.lanxing.lib.devices.ble.heartrate;

import android.os.RemoteException;
import bb.lanxing.lib.devices.base.DeviceContext;
import bb.lanxing.lib.devices.ble.heartrate.IRemoteHeartRateBeltController;
import bb.lanxing.lib.devices.utils.DeviceManagerHelper;

public class RemoteHeartRateBeltControllerImpl extends IRemoteHeartRateBeltController.Stub {
    private HeartRateBeltController mController;

    public RemoteHeartRateBeltControllerImpl(String str) {
        if (DeviceContext.getDeviceManager() != null) {
            this.mController = DeviceManagerHelper.getHeartRateBeltController();
        }
    }

    @Override
    public boolean setWarnHr(int i) throws RemoteException {
        HeartRateBeltController heartRateBeltController = this.mController;
        if (heartRateBeltController != null) {
            return heartRateBeltController.setWarnHr(i);
        }
        return false;
    }

    @Override
    public boolean closeWarnHr() throws RemoteException {
        HeartRateBeltController heartRateBeltController = this.mController;
        if (heartRateBeltController != null) {
            return heartRateBeltController.closeWarnHr();
        }
        return false;
    }

    @Override
    public void initWarnHr() throws RemoteException {
        HeartRateBeltController heartRateBeltController = this.mController;
        if (heartRateBeltController != null) {
            heartRateBeltController.initWarnHr();
        }
    }
}
